package io.github.bomb.batch.application;


import io.github.bomb.batch.domain.BatchTask;
import io.github.bomb.batch.infrastructure.repository.BatchTaskRepository;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * BatchTaskService
 * 负责管理批处理任务。
 */
@Service
public class BatchTaskService {

	private final BatchTaskRepository batchTaskRepository;

	public BatchTaskService(BatchTaskRepository batchTaskRepository) {
		this.batchTaskRepository = batchTaskRepository;
	}

	/**
	 * 获取所有批处理任务。
	 */
	public List<BatchTask> getAllTasks() {
		return batchTaskRepository.findAll();
	}
}
